<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@include file="/resource/common/taglib.jspf"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>${SESSION_COMPANY}-日程管理</title>
<%@include file="/resource/common/jquery.jspf"%>
<%@include file="/resource/common/commonCss.jspf"%>
<%@include file="/resource/common/bootstrap.jspf"%>
<%@include file="/resource/common/showLoading.jspf"%>
<%@include file="/resource/common/wdate-picker.jspf"%>
<script type="text/javascript" src="${ctx }/resource/js/ajax/pages/ajaxSafeWarnPage.js"></script>
<script type="text/javascript" src="${ctxStatic }/js/system/layerParentFn.js"></script>
<script type="text/javascript">
	var PATH = "${ctx}";
	//查询
	function addLayerOpen(id,titles){
		titles = id >0?"编辑："+titles:"新增:日程";
		layerParentFn.layerOpenModalDialog(titles,"addBmFullcalendar.do?id="+id,900,500,"inputForm","saveBmFullcalendarJson.do");
	}
	function browseLayerOpen(id,titles){
		titles = "浏览:"+titles;
		layerParentFn.layerOpenBrowseModalDialog(titles,"addBmFullcalendar.do?id="+id,900,500);
	}
</script>
</head>
<body>
	<div id="body-wrapper">
		<div id="main-content">
		<div class="clear"></div>
			<div class="content-box-content">
				<div class="search-box">
					<shiro:hasPermission name="bmFullcalendar:SYS_ADD">
						<a href="javascript:void(0)" onclick="addLayerOpen(0,'');" class="btn btn-primary" style="padding-bottom: 0px;padding-top: 0px;line-height: 25px;margin-top: -5px;"><i class="fa fa-plus"></i>&nbsp;&nbsp;新增</a>
					</shiro:hasPermission>
					<hr style="margin-top: 10px;margin-bottom: 10px;">
					<shiro:hasPermission name="bmFullcalendar:SYS_SEARCH">
						<form action="bmFullcalendarList.do" method="post" id="fromsearch" class="form-inline">
							<div class="form-group">
								<div class="input-group">
									<div class="input-group-addon">日程名称</div>
									<input type="text" class="form-control"  value="${entity.title}" name="safename" id="safename" placeholder="日程名称"/>
								</div>
							</div>
							<div class="form-group">
								<div class="input-group">
									<div class="input-group-addon">状态</div>
									<select name="status" id="status" class="form-control input-sm">
										<option value="1" <c:if test="${entity.status==1 }">selected="selected"</c:if>>正常</option>
										<option value="0" <c:if test="${entity.status==0}">selected="selected"</c:if>>删除</option>
										<option value="-1" <c:if test="${entity.status==-1}">selected="selected"</c:if>>所有</option>
									</select>
								</div>
							</div>
							<button type="submit" class="btn btn-sm btn-primary" ><i class="fa fa-search"></i>查询</button>
						</form>
					</shiro:hasPermission>	
				</div>
				<div class="tab-content default-tab" id="tab1">
					<table class="table table-bordered table-hover table-striped">
						<thead>
							<tr>
								<th class="text-center">编号</th>
								<th  class="text-center">日程名称</th>
								<th class="text-center">开始时间</th>
								<th class="text-center">结束时间</th>
								<th class="text-center">状态</th>
								<th class="text-center w210">操作</th>
							</tr>
						</thead>
						<tbody>
							<c:forEach var="entity" items="${pageBean.list}" varStatus="abc">
								<tr id="tr_${entity.id }">
									<td class="text-center">${startRow+abc.count}</td>
									<td class="text-center">${entity.title}</td>
									<td class="text-center"><fmt:formatDate value="${entity.timeStart}" pattern="yyyy-MM-dd HH:mm" /></td>
									<td class="text-center"><fmt:formatDate value="${entity.timeEnd}" pattern="yyyy-MM-dd HH:mm" /></td>
									<td class="text-center">
										<c:choose>
											<c:when test="${entity.status==1 }">正常</c:when>
											<c:otherwise>删除</c:otherwise>
										</c:choose>
									</td>
									<td class="text-center w210">
										<shiro:hasPermission name="bmFullcalendar:SYS_BROWSE"><a href="javascript:void(0);" onclick="browseLayerOpen(${entity.id},'${entity.title }');" class="btn btn-xs btn-info"><i class="fa fa-eye"></i>&nbsp;浏览</a> </shiro:hasPermission>
										<shiro:hasPermission name="bmFullcalendar:SYS_EDIT"><a href="javascript:void(0);" onclick="addLayerOpen(${entity.id},'${entity.title }');" class="btn btn-xs btn-primary"><i class="fa fa-edit"></i>&nbsp;编辑</a> </shiro:hasPermission>
										<shiro:hasPermission name="bmFullcalendar:SYS_DELETE">
											<c:choose>
												<c:when test="${entity.status==1 }">
													<a href="javascript:layerParentFn.listRemoveRowDeleteByIDStatus(${entity.id },${entity.status },'updateStatusBmFullcalendar.do');" class="btn btn-xs btn-danger"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
												</c:when>
												<c:otherwise>
													<a href="javascript:layerParentFn.listRemoveRowDeleteByIDStatus(${entity.id },${entity.status },'updateStatusBmFullcalendar.do');" class="btn btn-xs btn-info"><i class="fa fa-edit"></i>&nbsp;恢复</a>
												</c:otherwise>
											</c:choose>
										</shiro:hasPermission>
									</td>
								</tr>
							</c:forEach>
						</tbody>
						<tfoot>
							<tr>
								<td colspan="10">
									<div class="bulk-actions align-right"></div>
									<div class="paginationstyle">
										<page:pageboot url="bmFullcalendarList.do?title=${entity.title}&status=${entity.status }&" tagnum="2" pageBean="${pageBean}" />
									</div>
									<div class="clear"></div>
								</td>
							</tr>
						</tfoot>
					</table>
				</div>
				<!-- End #tab2 -->
				<!-- End .content-box-content -->
			</div>
		</div>
		<!-- End #main-content -->
	</div>
</body>
<!-- Download From www.exet.tk-->
</html>
